﻿@model Tecnosop.WebUI.Models.CreateFacturaStep1ViewModel
@{
    ViewBag.Title = "Facturación convenio";
    //Layout = "~/Views/FacturaConvenio/_LayoutFacturaConvenio.cshtml";
    Layout = MVC.Facturas.Views._LayoutFacturas;
}
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Paso 1: Datos iniciales</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.NumeroFactura)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.NumeroFactura)
            @Html.ValidationMessageFor(model => model.NumeroFactura)
        </div>

        <br />

        <fieldset>
            <legend style="font-size: small;">Datos cliente</legend>
            <div class="editor-label">
                @Html.LabelFor(model => model.RutCliente)
            </div>
            <div class="editor-field">
                @*@Html.EditorFor(model => model.RutCliente)*@
                @(Html.Telerik().AutoComplete()
                    .Name("RutCliente")
                    .BindTo(ViewBag.RutsClientes)
                    .Encode(false)
                    .HtmlAttributes(new { style = "width: 200px;" })
                )
                @Html.ValidationMessageFor(model => model.RutCliente)
            </div>

            <div class="editor-label">
                @Html.LabelFor(model => model.NombreCliente)
            </div>
            <div class="editor-field">
                @*@Html.EditorFor(model => model.NombreCliente)*@
                @(Html.Telerik().AutoComplete()
                    .Name("NombreCliente")
                    .BindTo(ViewBag.NombresClientes)
                    .Encode(false)
                    .HtmlAttributes(new { style = "width: 200px;"})
                )
                @Html.ValidationMessageFor(model => model.NombreCliente)
            </div>
        </fieldset>

        <fieldset>
            <legend style="font-size: small;">@Html.LabelFor(model => model.EsRazonSocialTecnosop)</legend>
            <div style="margin-top: 10px;">@Html.ValidationMessageFor(model => model.EsRazonSocialTecnosop)</div>

            <div class="editor-label">Comercializadora Tecnosop</div>
            <div class="editor-field" style="margin-top: 23px;">@Html.RadioButtonFor(model => model.EsRazonSocialTecnosop, true)</div>

            <div class="editor-label">Juan Carlos Maldonado Huerta</div>
            <div class="editor-field">@Html.RadioButtonFor(model => model.EsRazonSocialTecnosop, false)</div>
        </fieldset>

        <fieldset>
            <legend style="font-size: small;">@Html.LabelFor(model => model.EsFacturaConvenio)</legend>
            <div style="margin-top: 10px;">@Html.ValidationMessageFor(model => model.EsFacturaConvenio)</div>

            <div class="editor-label">Facturación convenio</div>
            <div class="editor-field" style="margin-top: 23px;">@Html.RadioButtonFor(model => model.EsFacturaConvenio, true)</div>

            <div class="editor-label">Facturación venta directa</div>
            <div class="editor-field">@Html.RadioButtonFor(model => model.EsFacturaConvenio, false)</div>
        </fieldset>

        <br />
        <hr />
        <p>
            <button type="submit" class="nice radius small blue button">Siguiente ></button>
            @*@Html.ActionLink("Cancelar", MVC.Equipo.Index(), new { @class = "nice radius small red button" })*@
            @*<button type="button" class="nice radius small blue button" onclick="history.back()">Cancelar</button>*@
        </p>
    </fieldset>
}
